<template>
  <div>
    <el-dialog
        :title="title"
        :visible.sync="dialogVisible"
        width="30%"
        >
        <span>{{scontent}}</span>
        <span slot="footer" class="dialog-footer">
            <el-button @click="close">取 消</el-button>
            <el-button type="primary" @click="confirm">确 定</el-button>
        </span>
    </el-dialog>
  </div>
</template>

<script>
  export default {
    props: {
      scontent:{
        type:String
      },
      title:{
        type:String
      },
      layerstatus: {
        type: Boolean
      }
    },
    data() {
      return {
        dialogVisible: false,
        
      }
    },
    watch:{
        layerstatus (newValue,oldValue){
            console.log(newValue,'010101');
            this.dialogVisible = newValue
        }
    },
    created() {
      
      
    },

    updated() {
    
    },
    mounted() {
      
    },
    computed:{
   
    },
    methods: {
      close(){
        this.dialogVisible = false;
        this.$emit("changeStatus",false)
      },

      confirm() {//下拉菜单添加事件
        this.dialogVisible = false;
        this.$emit("changeStatus",true)
      },

    },
    beforeDestroy() {
    //   this.scontent='';
    //   this.title='';
    //   this.dialogVisible = false;
        
    }
  }

</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
 
</style>
